Skip to content

ignore global core.attributesFile #200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andreineculau
Copy link
Collaborator

scenario: you have a global .gitattributes for settings crlf, text/binary, diff etc settings

then this is what you get

$ transcrypt --list-contexts                                                                                                                                                             default (no patterns in .gitattributes)
custom (no patterns in .gitattributes)

instead of

$ transcrypt --list-contexts                                                                                                                                                             default
custom

although the .gitattributes in the repo has the patterns defined

Point is: do we really support transcrypt globally? with custom contexts?
If we do, then we need to check all attributes files, not only the first one.

PS: on a different note, it also doesn't make sense (to me at least) that --add=<pattern> write to anything but a local gitattributes

@jmurty
Copy link
Collaborator

jmurty commented May 25, 2025

The check against non-local .gitattributes was added in #137 and although I don't tend to us config files like .gitattributes from outside the immediate repo directory, some people do. I can imagine for example situations where you want transcrypt to encrypt *.secret files across all your projects, in which case putting this in a global .gitattributes would make sense.

So I think the right fix here would be to check all attributes files, which won't necessarily be easy.

@jmurty
Copy link
Collaborator

jmurty commented May 25, 2025

See a potential alternative solution that finds contexts across all gitattributes files, not just one, in #202

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants